import Vue from 'vue'
import Vuex from 'vuex'
import dashboard from './dashboard'

Vue.use(Vuex)

const store = new Vuex.Store({
  state:{
    userInfo:null
  },
  getters:{},
  mutations:{
    saveUserInfo(state,payload){
      state.userInfo = payload
    }
  },
  actions:{},
  modules:{
    dashboard
  }
})

store.subscribe(()=>{
  // console.log(store.state)
})

export default store